<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <artifactId>{{projectName}}</artifactId>
        <groupId>{{packageName}}</groupId>
        <version>{{system.pub.versionString}}</version>
    </parent>

    <artifactId>{{projectName}}-provider</artifactId>
    <name>{{projectName}} provider</name>
    <description>{{projectName}} provider</description>
    
    <dependencies>
        <dependency>
            <groupId>{{packageName}}</groupId>
            <artifactId>{{projectName}}-core</artifactId>
            <version>${project.version}</version>
        </dependency>

        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>javax.servlet-api</artifactId>
            <scope>provided</scope>
        </dependency>
    </dependencies>

     <properties>
        <maven-jar-plugin.version>2.6</maven-jar-plugin.version>

    </properties>

    <profiles>
        <profile>
            <id>runtime</id>
            <build>
                <resources>
                    <resource>
                        <directory>${basedir}/src/main/resources</directory>
                        <includes>
                            <include>**/**</include>
                        </includes>
                    </resource>
                </resources>

                <plugins>
                    <plugin>
                        <groupId>org.springframework.boot</groupId>
                        <artifactId>spring-boot-maven-plugin</artifactId>
                        <configuration>
                            <finalName>{{projectName}}-provider</finalName>
                            <jvmArguments>-Dfile.encoding=UTF-8</jvmArguments>
                            <mainClass>{{packageName}}.RuntimeApplication</mainClass>
                            <outputDirectory>../</outputDirectory>
                        </configuration>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>repackage</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>

                </plugins>
            </build>
        </profile>
    </profiles>

</project>
